package com.rjwh.dingdong.client.mvp.model.impl;

import com.aishua.lib.task.AsResult;
import com.rjwh.dingdong.client.mvp.BaseModel;
import com.rjwh.dingdong.client.mvp.BasePresenter;
import com.rjwh.dingdong.client.mvp.model.IAddBabyBoundCompleteModel;
import com.rjwh.dingdong.client.network.ApiRequest;
import com.rjwh.dingdong.client.network.HttpWebServiceCallBack;

/**
 * @author Kay
 * @ClassName AddBabyBoundCompleteModel
 * @Description
 * @date 2016-7-28
 * @history 2016-7-28 author: description:
 */
public class AddBabyBoundCompleteModel extends BaseModel implements IAddBabyBoundCompleteModel, HttpWebServiceCallBack {

    public AddBabyBoundCompleteModel(BasePresenter basePresenter) {
        super(basePresenter);
    }

    /**
     * 添加宝宝
     *
     * @param childid
     * @param childname
     * @param birthday
     * @param sex
     * @param title
     */
    @Override
    public void addBaby(String childid, String childname, String birthday, String sex, String title) {
        ApiRequest.addBaby(childid, childname, birthday, sex, title, this);
    }

    @Override
    public void onServerDataAcquired(int businessType, AsResult mAsResult, boolean isRefresh) {
        if (getBasePresenter() != null) {
            getBasePresenter().onServerDataAcquired(businessType, mAsResult, isRefresh);
        }
    }
}
